package com.hp.snap.gr.model;

/**
 * Author: Shaxj
 * Date: 2016/1/19
 * SessionServer host info
 **/
public class HostInfo {
    String hostIp;
    String hostName;
    String login;
    String sshKey;
    String eIUMHostId;
    String eIUMInstance;
    String rtcHome;

    public String geteIUMHostId() {
        return eIUMHostId;
    }

    public void seteIUMHostId(String eIUMHostId) {
        this.eIUMHostId = eIUMHostId;
    }

    public String geteIUMInstance() {
        return eIUMInstance;
    }

    public void seteIUMInstance(String eIUMInstance) {
        this.eIUMInstance = eIUMInstance;
    }

    public String getRtcHome() {
        return rtcHome;
    }

    public void setRtcHome(String rtcHome) {
        this.rtcHome = rtcHome;
    }

    public String getHostIp() {
        return hostIp;
    }

    public void setHostIp(String hostIp) {
        this.hostIp = hostIp;
    }

    public String getHostName() {
        return hostName;
    }

    public void setHostName(String hostName) {
        this.hostName = hostName;
    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getSshKey() {
        return sshKey;
    }

    public void setSshKey(String sshKey) {
        this.sshKey = sshKey;
    }

    @Override
    public String toString() {
        return "HostInfo{" +
                "hostIp='" + hostIp + '\'' +
                ", hostName='" + hostName + '\'' +
                ", login='" + login + '\'' +
                ", sshKey='" + sshKey + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (!(o instanceof HostInfo))
            return false;

        HostInfo hostInfo = (HostInfo) o;

        if (getHostIp() != null ? !getHostIp().equals(hostInfo.getHostIp()) : hostInfo.getHostIp() != null)
            return false;
        if (getHostName() != null ? !getHostName().equals(hostInfo.getHostName()) : hostInfo.getHostName() != null)
            return false;
        return !(getLogin() != null ? !getLogin().equals(hostInfo.getLogin()) : hostInfo.getLogin() != null);

    }

    @Override
    public int hashCode() {
        int result = getHostIp() != null ? getHostIp().hashCode() : 0;
        result = 31 * result + (getHostName() != null ? getHostName().hashCode() : 0);
        result = 31 * result + (getLogin() != null ? getLogin().hashCode() : 0);
        return result;
    }
}
